(function(TYPES,typeId){
    function my_g(){
        var that = this;
        this.run=function(len1,len2){
            var k = 0;
            var i = 0;
            var my_c = ME.run(len1);
            my_c.onComplete=function(result){
                var my_b = result;
                (function my_a(i){
                    if (i < my_b) {
                        var a = i;
k+=a;
var j = 0;
var my_f = ME.run(len2);
my_f.onComplete=function(result){
                            var my_e = result;
                            (function my_d(j){
                                if (j < my_e) {
                                    var b = j;
k+=b;
my_d(++j);
                                } else {
                                    var c = i * 2;
k+=c;
my_a(++i);
                                };
                            })(j);
                        }
                    } else {
                        var l = 1;
k+=l;
that.onComplete(k);
                    };
                })(i);
            }
        }
        this.onComplete=function(result){
            return result;
        }
    }    TYPES.registerType(typeId,my_g);
})(RULES,"test2-1");
